<?php
require_once 'mysql.php';

// 配置连接参数
$config = [
    'host' => 'localhost',
    'username' => 'username',
    'password' => 'password',
    'dbname' => 'projectDB'
];

// 连接数据库
$mysql = new mysql();

$mysql->connect($config);

$table = 'childrenclass';
$data = [
    'name' => '机器人',
    'level' => 1
];
$where = 'id=24';

$result = $mysql->update($table, $data, $where);

echo $result;

// print_r($mysql->fetchAll());